package com.study.generator.server;

import com.study.generator.util.FreemakerUtil;
import freemarker.template.TemplateException;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

public class ControllerGenerator {
    static String toServicePath = "business\\src\\main\\java\\com\\study\\business\\controller\\admin\\";
    public static void main(String[] args) throws IOException, TemplateException {

        String Domain = "Section";
        String domain = "section";
        String tableNameCn =  "小节";
        Map map = new HashMap();
        map.put("Domain",Domain);
        map.put("domain",domain);
        map.put("tableNameCn",tableNameCn);

        FreemakerUtil.initConfig("contoller.ftl");
        FreemakerUtil.getConfig(toServicePath+Domain+"Controller.java",map);
    }
}
